from django.contrib import admin
from userapp.models import BookInfo, PersonInfo


# 自定义管理页面bookinfo和personinfo的显示内容
class BookInfoAdmin(admin.ModelAdmin):
    list_display = ('id', 'book_title', 'book_date', 'read_num', 'book_comment')


class PersonInfoAdmin(admin.ModelAdmin):
    list_display = ('id', 'person_name', 'isDelete', 'person_comment')


# Register your models here.
# 注册模型类，也就是把models中的bookinfo和personinfo数据表，添加到admin的后台管理界面之中
admin.site.register(BookInfo, BookInfoAdmin)
admin.site.register(PersonInfo, PersonInfoAdmin)
